Optimal. Leaf size=50 \[ \frac {a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^3(c+d x)}{3 d}+\frac {a^3 \tan ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3738, 12, 3852}
\begin {gather*} \frac {a^3 \tan ^5(c+d x)}{5 d}+\frac {2 a^3 \tan ^3(c+d x)}{3 d}+\frac {a^3 \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3738
Rule 3852
Rubi steps
\begin {align*} \int \left (a+a \tan ^2(c+d x)\right )^3 \, dx &=\int a^3 \sec ^6(c+d x) \, dx\\ &=a^3 \int \sec ^6(c+d x) \, dx\\ &=-\frac {a^3 \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac {a^3 \tan (c+d x)}{d}+\frac {2 a^3 \tan ^3(c+d x)}{3 d}+\frac {a^3 \tan ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 38, normalized size = 0.76 \begin {gather*} \frac {a^3 \left (\tan (c+d x)+\frac {2}{3} \tan ^3(c+d x)+\frac {1}{5} \tan ^5(c+d x)\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 35, normalized size = 0.70
method | result | size |
derivativedivides | \(\frac {a^{3} \left (\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (d x +c \right )\right )}{3}+\tan \left (d x +c \right )\right )}{d}\) | \(35\) |
default | \(\frac {a^{3} \left (\frac {\left (\tan ^{5}\left (d x +c \right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (d x +c \right )\right )}{3}+\tan \left (d x +c \right )\right )}{d}\) | \(35\) |
norman | \(\frac {a^{3} \tan \left (d x +c \right )}{d}+\frac {2 a^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {a^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}\) | \(47\) |
risch | \(\frac {16 i a^{3} \left (10 \,{\mathrm e}^{4 i \left (d x +c \right )}+5 \,{\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 102 vs.
\(2 (46) = 92\).
time = 0.49, size = 102, normalized size = 2.04 \begin {gather*} a^{3} x + \frac {{\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{3}}{15 \, d} + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3}}{d} - \frac {3 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{3}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.74, size = 43, normalized size = 0.86 \begin {gather*} \frac {3 \, a^{3} \tan \left (d x + c\right )^{5} + 10 \, a^{3} \tan \left (d x + c\right )^{3} + 15 \, a^{3} \tan \left (d x + c\right )}{15 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 54, normalized size = 1.08 \begin {gather*} \begin {cases} \frac {a^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {2 a^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} + \frac {a^{3} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \tan ^{2}{\left (c \right )} + a\right )^{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 297 vs.
\(2 (46) = 92\).
time = 0.73, size = 297, normalized size = 5.94 \begin {gather*} -\frac {15 \, a^{3} \tan \left (d x\right )^{5} \tan \left (c\right )^{4} + 15 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right )^{5} + 10 \, a^{3} \tan \left (d x\right )^{5} \tan \left (c\right )^{2} - 30 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right )^{3} - 30 \, a^{3} \tan \left (d x\right )^{3} \tan \left (c\right )^{4} + 10 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right )^{5} + 3 \, a^{3} \tan \left (d x\right )^{5} - 5 \, a^{3} \tan \left (d x\right )^{4} \tan \left (c\right ) + 60 \, a^{3} \tan \left (d x\right )^{3} \tan \left (c\right )^{2} + 60 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right )^{3} - 5 \, a^{3} \tan \left (d x\right ) \tan \left (c\right )^{4} + 3 \, a^{3} \tan \left (c\right )^{5} + 10 \, a^{3} \tan \left (d x\right )^{3} - 30 \, a^{3} \tan \left (d x\right )^{2} \tan \left (c\right ) - 30 \, a^{3} \tan \left (d x\right ) \tan \left (c\right )^{2} + 10 \, a^{3} \tan \left (c\right )^{3} + 15 \, a^{3} \tan \left (d x\right ) + 15 \, a^{3} \tan \left (c\right )}{15 \, {\left (d \tan \left (d x\right )^{5} \tan \left (c\right )^{5} - 5 \, d \tan \left (d x\right )^{4} \tan \left (c\right )^{4} + 10 \, d \tan \left (d x\right )^{3} \tan \left (c\right )^{3} - 10 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + 5 \, d \tan \left (d x\right ) \tan \left (c\right ) - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.47, size = 36, normalized size = 0.72 \begin {gather*} \frac {a^3\,\mathrm {tan}\left (c+d\,x\right )\,\left (3\,{\mathrm {tan}\left (c+d\,x\right )}^4+10\,{\mathrm {tan}\left (c+d\,x\right )}^2+15\right )}{15\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________